#include "setlinedialog.h"
#include "ui_setlinedialog.h"

SetLineDialog::SetLineDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::SetLineDialog)
{
    ui->setupUi(this);

    this->setWindowFlags(Qt::FramelessWindowHint);    //无边框
    this->setStyleSheet("outline: none;");            //无虚线框
}

SetLineDialog::~SetLineDialog()
{
    delete ui;
}

void SetLineDialog::setLineText(int line)
{
    this->line = line;
    ui->message->setText(tr("是否设置从第")+QString::number(line+1)+tr("行开始运行?"));
}

void SetLineDialog::changeLanguage()
{
    ui->retranslateUi(this);
}

void SetLineDialog::on_sureBtn_clicked()
{
    emit setRunStartRow(line);
    this->hide();
}

void SetLineDialog::on_cancelBtn_clicked()
{
    this->hide();
}
